package Month09.day0910;

import javax.swing.text.StyledDocument;

public class Student {
    public String name = "李雷";
    public int age = 18;
    public String gender = "男";

    public Student(){
    }
    public Student(String name){
        this();
        System.out.println("调用有一个参数的构造");
    }
    public Student(int year){
        this.age = year;
    }
    public Student(int age,String name){
        System.out.println("注意参数互换，这是两个参数的构造");
    }

    public Student(String name,int age,String gender){
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public void printf(){
        System.out.println(name + " " + age + " " + gender);
    }
    public static void main(String[] args) {
        Student s1 = new Student();
        s1.printf();
        Student s2 = new Student("韩梅梅",17,"女");
        s2.printf();
    }
}
